package com.imooc.activitiweb.listener;


import org.activiti.engine.delegate.DelegateTask;
import org.activiti.engine.delegate.TaskListener;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * 任务监听器
 *
 * @author jzwu
 * @since 2021/3/21 0021
 */

public class TkListener2 implements TaskListener {
    private static final Logger LOGGER = LoggerFactory.getLogger(TkListener2.class);

    @Override
    public void notify(DelegateTask delegateTask) {
        LOGGER.info("执行人2：{}", delegateTask.getVariable("delegateAssignee"));
        // 根据用户名查询查询出上级领导
        delegateTask.setAssignee("wukong");
    }
}